package com.srxz.mobilepharmacy.repository;

import com.srxz.mobilepharmacy.entity.MedHouse;
import com.srxz.mobilepharmacy.entity.MedHousePK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

@Repository
public interface MedHouseRepository extends JpaRepository<MedHouse, MedHousePK> {
    @Query("from MedHouse where id.aid=?1 and id.typ = 2")
    public List<MedHouse> findHouseByAid(BigInteger aid);
}
